package com.erebus.service.impl;

import com.erebus.model.dto.AuthParamsDto;
import com.erebus.model.dto.UserExt;
import com.erebus.service.AuthService;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;

@Service("password_authservice")
public class PasswordAuthServiceImpl implements AuthService {


    @Override
    public UserExt execute(AuthParamsDto authParamsDto) {


        System.out.println(authParamsDto);

        // todo:  验证验证验证


        UserExt userExt = new UserExt();
        userExt.setUsername(authParamsDto.getUsername());
        userExt.setPassword(authParamsDto.getPassword());
        userExt.setUserId(234234);
        userExt.setName("aa");
        userExt.setPhone("233123");
        userExt.setOpenid("sdfsd");
        userExt.setCreateTime(LocalDateTime.now());
        userExt.setUpdateTime(LocalDateTime.now());
        return userExt;
    }
}
